﻿using System;

namespace HslCommunication.Core.IMessage
{
	/// <summary>
	/// 三菱的Qna兼容3E帧协议解析规则
	/// </summary>
	// Token: 0x0200015F RID: 351
	public class MelsecQnA3EBinaryMessage : INetMessage
	{
		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.ProtocolHeadBytesLength" />
		// Token: 0x170005FB RID: 1531
		// (get) Token: 0x06001D8E RID: 7566 RVA: 0x00047CC1 File Offset: 0x00045EC1
		public int ProtocolHeadBytesLength
		{
			get
			{
				return 9;
			}
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.GetContentLengthByHeadBytes" />
		// Token: 0x06001D8F RID: 7567 RVA: 0x0008D932 File Offset: 0x0008BB32
		public int GetContentLengthByHeadBytes()
		{
			return (int)BitConverter.ToUInt16(this.HeadBytes, 7);
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.CheckHeadBytesLegal(System.Byte[])" />
		// Token: 0x06001D90 RID: 7568 RVA: 0x0008D940 File Offset: 0x0008BB40
		public bool CheckHeadBytesLegal(byte[] token)
		{
			bool flag = this.HeadBytes == null;
			bool result;
			if (flag)
			{
				result = false;
			}
			else
			{
				bool flag2 = this.HeadBytes[0] == 208 && this.HeadBytes[1] == 0;
				result = flag2;
			}
			return result;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.GetHeadBytesIdentity" />
		// Token: 0x06001D91 RID: 7569 RVA: 0x00047BE1 File Offset: 0x00045DE1
		public int GetHeadBytesIdentity()
		{
			return 0;
		}

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.HeadBytes" />
		// Token: 0x170005FC RID: 1532
		// (get) Token: 0x06001D92 RID: 7570 RVA: 0x0008D989 File Offset: 0x0008BB89
		// (set) Token: 0x06001D93 RID: 7571 RVA: 0x0008D991 File Offset: 0x0008BB91
		public byte[] HeadBytes { get; set; }

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.ContentBytes" />
		// Token: 0x170005FD RID: 1533
		// (get) Token: 0x06001D94 RID: 7572 RVA: 0x0008D99A File Offset: 0x0008BB9A
		// (set) Token: 0x06001D95 RID: 7573 RVA: 0x0008D9A2 File Offset: 0x0008BBA2
		public byte[] ContentBytes { get; set; }

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.SendBytes" />
		// Token: 0x170005FE RID: 1534
		// (get) Token: 0x06001D96 RID: 7574 RVA: 0x0008D9AB File Offset: 0x0008BBAB
		// (set) Token: 0x06001D97 RID: 7575 RVA: 0x0008D9B3 File Offset: 0x0008BBB3
		public byte[] SendBytes { get; set; }
	}
}
